<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1566901_07oyohn3uypw.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.2.16/lib/index.css">
    <link rel="stylesheet" href="../css/activity.css" type="text/css">
    
    <script type="text/javascript" src="../script/vue.js"></script>
    
    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js"></script>
    <script src="../script/axios.js"></script>
    <script src="../script/SHA1.js"></script>
    <script src="../script/es6-promise.auto.min.js"></script>
</head>

<body>
    <div id="app">
        <div class="activityheader">
            <h1>玩转途young</h1>

        </div>
        <ul class="submenu">
            <select onchange="citytype(this.options.selectedIndex)">
                <option value="全城">全城</option>
                <option value="晋城" >阳晋城</option>
            </select>
            <select onchange="playtype(this.options.selectedIndex)">
                <option value="全部类型">全部类型</option>
                <option value="自驾游">自驾游</option>
                <option value="跟团游">跟团游</option>
            </select>
        </ul>
        <!-- 幻灯片 start-->
        <div id="swipper-box">
            <div class="swipper-box">
                <van-swipe :autoplay="3000" indicator-color="white">
                    <van-swipe-item>
                        <img src="https://bkimg.cdn.bcebos.com/pic/6a600c338744ebf8497fb82dd6f9d72a6059a792@wm_1,g_7,k_d2F0ZXIvYmFpa2UyNzI=,xp_5,yp_5" alt="">
                        <p>1</p>
                    </van-swipe-item>
                    <van-swipe-item>
                        <img src="https://bkimg.cdn.bcebos.com/pic/b7003af33a87e95048b119f212385343faf2b48e@c_1,x_18,y_0,w_837,h_552%7Cwm_1,g_7,k_d2F0ZXIvYmFpa2U5Mg==,xp_5,yp_5" alt="">
                        <p>2</p>
                    </van-swipe-item>
                    <van-swipe-item>
                        <img src="https://bkimg.cdn.bcebos.com/pic/faedab64034f78f0a29b392c72310a55b2191c58@wm_1,g_7,k_d2F0ZXIvYmFpa2U4MA==,xp_5,yp_5" alt="">
                        <p>3</p>
                    </van-swipe-item>
                </van-swipe>
            </div>
        </div>
        <!--幻灯片 end -->

        <div class="news">
            <ul>
                <li  v-for="item in aList" ><img v-bind:src ="item.thumbnail.url" alt="加载中" v-on:click="jumpDetail(item)">
                    <p>{{ item.title  }}</p> 
                    <em>{{ item.title2 }}</em>                  
                </li>
            </ul>
        </div>
        <div class="tabbar">
            <ul>
                <li><a href="../index.html"><span class="iconfont icon-shouye"></span>
                        <p>首页</p>
                    </a>
                </li>
                <li><a href="area.html">
                        <span class="iconfont icon-diqu"></span>
                        <p>地区</p>
                    </a>
                </li>
                <li><a href="life.html">
                        <span class="iconfont icon-shenghuo"></span>
                        <p>生活</p>
                    </a>
                </li>
                <li><a href="activity.html">
                        <span class="iconfont icon-huodong"></span>
                        <p>活动</p>
                    </a>
                </li>
                <li><a href="mine.html">
                        <span class="iconfont icon-wode"></span>
                        <p>我的</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</body>
<script>

var now = Date.now();
    var appKey = SHA1("A6022694570982" + "UZ" + "67A344E5-99A7-33F1-6B44-2616F73CD174" + "UZ" + now) + "." + now
    var vm = new Vue({
        el: "#app",
        data: {
       
            aList:{}
    
 },
 created: function () {
        this.List()
      },

        methods: {
            
            jumpDetail: function (item) {
          window.location.href = "activity1.html?id=" + item.id
        },
    
            List: function () {
          var _this = this;
          axios.get('https://d.apicloud.com/mcm/api/hotel', {
            headers: {
              "X-APICloud-AppId": "A6022694570982",
              "X-APICloud-AppKey": appKey
            }
          })
            .then(function (response) {
              _this.aList = response.data
              console.log(response.data);
              
            })
            .catch(function (error) {
              console.log(error);
            });
        }
      },




              
    }
    )
    
</script>

</html>